import csv
import re
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from pyquery import PyQuery as pq
import pandas as pd



#
# df=pd.read_csv("D:/Awei/link.csv",encoding='utf-8',header=None,usecols=[0])
# t = df.values.tolist()
# list=[]
# for i in t:
#     list.append(i[0])
# print(list)

brower = webdriver.Chrome()
wait = WebDriverWait(brower, 10)

def get_source(str):
    brower.get(str)
    html = brower.page_source
    doc = pq(html)
    wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, '#article_eng > div')))
    items = doc('#mainsrp-itemlist .items .item').items()
if __name__ == '__main__':
    get_source('http://www.kekenet.com/read/202008/616824.shtml')